class DDArray extends Array {
  lastItem() {
    return this[this.length - 1]
  }
}

var arr = new DDArray(10, 20, 30)
console.log(arr.lastItem())
